<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>08_axios批量发送请求</title>
    <script src="js/axios.min.js"></script>
</head>
<body>
<button id="btn">批量发送请求</button>
<script type="text/javascript">
    const btn = document.getElementById('btn')

    btn.onclick = () => {
        axios.all([
            axios.get('http://localhost:5000/test1'),
            axios.get('http://localhost:5000/test2?delay=2000'),
            axios.get('http://localhost:5000/test3')
        ]).then(
            response => {
                console.log(response)
            },
            error => {
                console.log(error)
            }
        )
    }
</script>
</body>
</html>
